home *** CD-ROM | disk | FTP | other *** search
- //
- // MiscAppExtensions.h -- a category to make extra information available
- // via the application object.
- // Written by Don Yacktman Copyright (c) 1993, 1994 by Don Yacktman.
- // Version 1.3. All rights reserved.
- // This notice may not be removed from this source code.
- //
- // This object is included in the MiscKit by permission from the author
- // and its use is governed by the MiscKit license, found in the file
- // "LICENSE.rtf" in the MiscKit distribution. Please refer to that file
- // for a list of all applicable permissions and restrictions.
- //
-
- #import <appkit/appkit.h>
-
- int MiscOSVersion(); // returns a 0 or 1 (for 3.0 vs. 3.1) -1 on error
-
- @interface Application(MiscAppExtensions)
-
- - (const char *)appDirectory;
- - (int)osVersion;
- - (int)userIDNum;
- - (int)groupIDNum;
- - (int)effectiveUserIDNum;
- - (int)effectiveGroupIDNum;
- - (unsigned long int)hostID;
- - (NXAtom)userHomeDirectory;
- - (NXAtom)userLoginName;
- - (NXAtom)userRealName;
- - (NXAtom)realHostName;
- - (NXAtom)realNameFor:(NXAtom)userId;
- - (BOOL)groupMemberForID:(gid_t)anID;
- - (BOOL)groupMemberForString:(const char *)aString;
-
- // The following four were donated by Thomas Engel <tomi@shinto.nbg.sub.org>
- - (NXAtom)domainName;
- - (NXAtom)realDomainName;
- - (BOOL)knowsDefaultValue:(const char *)defName;
- - (BOOL)didAutolaunch;
-
- @end
-
- @interface Window(MiscWindowExtensions)
-
- - (BOOL)isMiniaturized;
-
- @end
-
- // This is for back compatability, but you ought to remove all references
- // to ExtendedApp from your code NOW!!!
- #define ExtendedApp Application
-
- #ifndef DAYAPPCOMPAT_H
- #define DAYAPPCOMPAT_H
- #define DAYOSVersion MiscOSVersion
- #endif DAYAPPCOMPAT_H
-